
<%@page import="java.util.Collections"%>

<%@page import="java.util.Locale"%>
<%@page import="java.util.ResourceBundle"%>
<%@page import="entity.Question"%>
<%@page import="model.QuestionModel"%>
<%@page import="java.util.List"%>
<%
	if (request.getParameter("alias") != null
			&& request.getParameter("language") != null) {

		String alias = request.getParameter("alias").toString();
		String lang = request.getParameter("language").toString();

		QuestionModel questionModel = new QuestionModel();
		Question q = questionModel.findByAlias(alias, lang);
		if(q!=null){
			List<Question> listBrother = questionModel.getBrotherQuestion(
					q.getTags(), lang);	
			
	if (listBrother.size() > 0) {
%>
		<h3>Related Question</h3>
		<ul class="vr">
			<%
				for (Question item : listBrother) {
					if(item.getAlias().equals(alias)){
						continue;						
					}
			%>
			<li><a
				href="<%=request.getContextPath()%>/<%=lang%>/question/<%=item.getAlias()%>"
				title="<%=item.getTitle()%>"><%=item.getTitle()%></a></li>
			<%
				}
			%>
		</ul>
<%
	}
	}
%>

<%
	}
%>

